/*
 * AdapterListener.h
 *
 *  Created on: Jul 15, 2008
 *      Author: Kyle
 */

#ifndef ADAPTERLISTENER_H_
#define ADAPTERLISTENER_H_

#include "includes.h"

class AdapterListener {
public:
	AdapterListener(pcap_t* _adapter);
	virtual ~AdapterListener();
	void operator()();
	void run();
	// stupid c-style function pointers damn you libpcap
	static void parse(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data);
	boost::thread *getThread();
protected:
	pcap_t *adapter;
	boost::thread* thread;
};

#endif /* ADAPTERLISTENER_H_ */
